package org.example;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.example.dao.WordGraph;
import org.example.utils.TextUtils;
import org.jgrapht.graph.DefaultWeightedEdge;

/**
 * Main class to demonstrate the functionality of the WordGraph.
 */
public class Main {

    public static final TextUtils textUtils = new TextUtils();

    /**
     * The main method to run the demonstration.
     *
     * @param args command line arguments.
     */
    public static void main(String[] args) throws IOException {
        WordGraph wordGraph =new WordGraph();
        String v1 = "A";
        String v2 = "B";
        String v3 = "C";
        wordGraph.graph.addVertex(v1);
        wordGraph.graph.addVertex(v2);
        wordGraph.graph.addVertex(v3);
        DefaultWeightedEdge e1 = wordGraph.graph.addEdge(v1, v2);
        DefaultWeightedEdge e2 = wordGraph.graph.addEdge(v2, v3);
        DefaultWeightedEdge e3 = wordGraph.graph.addEdge(v3, v1);
        wordGraph.graph.setEdgeWeight(e1, 1.0);
        wordGraph.graph.setEdgeWeight(e2, 1.0);
        wordGraph.graph.setEdgeWeight(e3, 1.0);
        wordGraph.randomWalk();

    }
}
